package com.lyf.scm.admin.domain.remote.network;

import com.lyf.scm.admin.api.dto.DateLabelDTO;
import com.lyf.scm.admin.domain.remote.network.dto.SearchSourceToBReturnDTO;
import com.lyf.scm.admin.domain.remote.network.dto.SearchSourceToCQueryDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

/**
 * 组网
 *
 * @author wangchlei
 * @date 2020/08/14
 */
@FeignClient(name = "scm-network-service")
public interface NetworkRemote {
    /**
     * 根据当前日期获取前三周后十四周公立节假日（对计划接口）
     *
     * @param startDate
     * @return {@link Response<List<DateLabelDTO>>}
     **/
    @GetMapping("/api/v1/dayOff/dateLabels")
    Response<List<DateLabelDTO>> getDateLabels(@RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate);

    /**
     * TOB寻仓
     */
    @PostMapping("/api/v1/route/source")
    Response<List<SearchSourceToBReturnDTO>> searchToBSource(@RequestBody List<String> storeCodeList);

    /**
     * TOC寻仓
     * @param queryToCList
     * @return
     */
    @PostMapping("/api/v1/outbound/analyze/warehouse")
    Response<List<SearchSourceToCQueryDTO>> searchToCSource(@RequestBody List<SearchSourceToCQueryDTO> queryToCList);
}
